<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="java.util.ArrayList,
                 com.scalar.chiptrack.utils.ConfigManager" %>


<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<chiptrack:checkLogon sourcePage="/baseProductList.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<%  HttpSession ses = request.getSession(true);

	String type=(String) request.getAttribute("type"); 
	String fabStageId=(String) request.getAttribute("fabStageId"); 

%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<script>

function saveSubStep()
{
	document.fabsubstage.submit();
		
}


</script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<html:form name="fabsubstage" type="com.scalar.chiptrack.operations.process.forms.FabSubStageForm" action="/fabSaveSubStep">

<input type="hidden" name="type" value="<%=type%>">
<input type="hidden" name="fabStageId" value="<%=fabStageId%>">



<!-- Top Header Start-->

<%@ include file="/jsp/includes/header.jsp" %>

<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

<!-- Side Navigation start -->

<%@ include file="/jsp/operations/operations_menu.jsp" %>

	</TD>
<!-- end of the side navigations -->

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<!-- from here your body starts -->


<center><span class="NArialW">FAB Sub step</span></center> <img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>

 <font class="NArialL">

    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    FAB Sub Step Information</p>

    <div align="right">

    <table border="0" width="90%" bordercolor="#FFFFFF" >
      <tr>

        <td width="20%" align="center" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">FAB
          Step Name</font></td>
        
        <td width="30%" align="center" bgcolor="#993333" align="center"><font class="NArialL"><font color="#FFFFFF">Comments</font></font></td>
      </tr>

	
	<logic:iterate id="subStageList" name="subStageList" >
	<logic:notEqual name="subStageList" value="null">
	<logic:notEqual name="subStageList" property="fabStepName" value="">

      <tr>
       <td width="20%" align="left" bgcolor="#DEE1E2" align="center">
          <p align="center"><font class="NArialL">
<html:text name="subStageList" property="fabStepName" size="15" styleClass="txfield" /></font></p>
        </td>
          <td width="30%" bgcolor="#DEE1E2">
          <p align="center">
	<html:textarea  name="subStageList" rows="3" property="comments" styleClass="txfield"/></p>
        </td>
      </tr>
	</logic:notEqual>
    </logic:notEqual>
	</logic:iterate>
		
		<% ArrayList subStageList =(ArrayList) ses.getAttribute("subStageList");
		if(subStageList==null){
		//System.out.println("In if");
		%>

		 <tr>

        <td width="20%" align="left" bgcolor="#DEE1E2" align="center">
          <p align="center"><font class="NArialL">
<input type="text"  name="fabStepName" size="15" class="txfield" ></font></p>
        </td>
             <td width="30%" bgcolor="#DEE1E2">
          <p align="center">
<textarea name="comments" rows="3"  class="txfield"></textarea></p>
        </td>
      </tr>

<tr>
       <td width="20%" align="left" bgcolor="#DEE1E2" align="center">
          <p align="center"><font class="NArialL">
<input type="text"  name="fabStepName" size="15" class="txfield" ></font></p>
        </td>
             <td width="30%" bgcolor="#DEE1E2">
          <p align="center">
<textarea name="comments" rows="3" name="S1"  class="txfield" ></textarea></p>
        </td>
      </tr>

<%}%>
    </table>

    </div>

  <p align="center">&nbsp;
  	<a href="javascript:saveSubStep()">
	<img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17"></a>
  	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	</p>

    <p align="center">&nbsp;</p>

      </font>


<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->

<%@ include file="/jsp/includes/footer.jsp" %>

<!-- footer end here -->
</html:form>
</BODY>
</HTML>
